package com.iptv.grape.util;

import android.widget.Toast;

import com.iptv.grape.RunTimeApplication;

public class ToastUtil {
    private static Toast mToast;
     public static void show(Object obj){
         if(null == obj)
             obj = "无打印Toast数据";
         if(mToast==null){
             mToast = Toast.makeText(RunTimeApplication.getCurApp(),String.valueOf(obj),Toast.LENGTH_LONG);
         }else{
             mToast.setText(String.valueOf(obj));
         }
         mToast.show();
     }
     public static void showRes(int strId){
         if(strId==0){
             show(null);
             return;
         }
         if(mToast==null){
             mToast = Toast.makeText(RunTimeApplication.getCurApp(),strId,Toast.LENGTH_LONG);
         }else{
             mToast.setText(strId);
         }
         mToast.show();
     }


}
